home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1996 June / Software of the Month Club 1996 June.iso / pc / dos / edu / colaid / col_aid.2 / PSPREFIX.PS < prev    next >
Encoding:
Text File  |  1994-10-06  |  3.9 KB  |  113 lines

  1. /errorMsg { erasepage initmatrix initclip initgraphics 72 72 moveto
  2.             /Helvetica findfont 12 scalefont setfont show
  3.             (: ) show 100 string cvs show
  4.             showpage stop } def
  5.  
  6. errordict begin
  7.  
  8. /dictfull           { (dictfull) errorMsg } def
  9. /dictstackoverflow  { (dictstackoverflow) errorMsg } def
  10. /dictstackunderflow { (dictstackunderflow) errorMsg } def
  11. /execstackoverflow  { (execstackoverflow) errorMsg } def
  12. /handleerror        { (handleerror) errorMsg } def
  13. /invalidaccess      { (invalidaccess) errorMsg } def
  14. /invalidfileaccess  { (invalidfileaccess) errorMsg } def
  15. /invalidfont        { (invalidfont) errorMsg } def
  16. /invalidrestore     { (invalidrestore) errorMsg } def
  17. %/ioerror            { (ioerror) errorMsg } def
  18. /limitcheck         { (limitcheck) errorMsg } def
  19. /nocurrentpoint     { (nocurrent point) errorMsg } def
  20. /rangecheck         { (rangecheck) errorMsg } def
  21. /stackoverflow      { (stackoverflow) errorMsg } def
  22. /stackunderflow     { (stackunderflow) errorMsg } def
  23. /syntaxerror        { (syntaxerror) errorMsg } def
  24. /timeout            { (timeout) errorMsg } def
  25. /typecheck          { (typecheck) errorMsg } def
  26. /undefined          { (undefined) errorMsg } def
  27. /undefinedfilename  { (undefinedfilename) errorMsg } def
  28. /undefinedresult    { (undefinedresult) errorMsg } def
  29. /unmatchedmark      { (unmatchedmark) errorMsg } def
  30. /unregistered       { (unregistered) errorMsg } def
  31. /VMerror            { (VMerror) errorMsg } def
  32. /undefined          { (undefined) errorMsg } def
  33. /nocurrentpoint     { pop 0 0 } def
  34. end
  35. statusdict /waittimeout 120 put
  36. 100 dict begin
  37.  
  38. /bitmap {   gsave
  39.             72 hres div 72 vres div scale
  40.             translate exch dup 8 idiv dup 512 ge 
  41.             { pop 512 } if /picstr exch string
  42.             def exch true [1 0 0 1 0 0]
  43.             { currentfile picstr readhexstring pop } imagemask
  44.             grestore
  45. } def
  46.  
  47. /showpic {  gsave
  48.             72 hres div 72 vres div scale
  49.             translate true exch [1 0 0 1 0 0] exch cvx imagemask
  50.             grestore
  51. }def
  52. /m { exch 72 mul hres div exch 72 mul vres div moveto } def
  53. /mx { 72 mul hres div currentpoint exch pop moveto } def
  54. /my { 72 mul vres div currentpoint pop exch moveto } def
  55. /ry { 72 mul vres div 0 exch rmoveto } def
  56. %/s { 72 mul hres div exch 0 exch 32 exch widthshow } def
  57.  
  58. /mv { exch 72 mul hres div exch 72 mul vres div moveto } def
  59. /mvb { exch x add 72 mul hres div exch y add 72 mul vres div moveto } def
  60. /s { 3 1 roll mv { pop pop mv } exch kshow } def
  61. /sbs { mvb { pop pop mvb } str kshow } def
  62. /sb { /x 0 def
  63.      /y 0 def
  64.      /dy exch def
  65.      /dx exch def
  66.      /cnt exch def
  67.      /str exch def
  68.     1 1 cnt { pop counttomark copy sbs /x x dx add def /y y dy add def } for
  69.     cleartomark } def
  70.  
  71. /b {    72 mul hres div /ax exch def
  72.         /bc exch def
  73.         72 mul hres div /cx exch
  74.         def /str exch def
  75.         currentpoint /y exch def /x exch def
  76.         sb currentpoint 1 1 bc { pop sb } for moveto
  77.    } def
  78. /fr {   gsave 0 setgray
  79.         72 mul vres div /ly exch def
  80.         72 mul hres div /lx exch def
  81.         72 mul vres div /uy exch def
  82.         72 mul hres div /ux exch def
  83.         currentpoint
  84.         ux uy moveto lx uy lineto lx ly lineto ux ly lineto closepath fill
  85.         moveto grestore
  86.     } def
  87. /fgr {  gsave
  88.         100 exch sub 100 div setgray
  89.         72 mul vres div /ly exch def
  90.         72 mul hres div /lx exch def
  91.         72 mul vres div /uy exch def
  92.         72 mul hres div /ux exch def
  93.         ux uy moveto lx uy lineto lx ly lineto ux ly lineto closepath fill
  94.         grestore
  95.     } def
  96. /f { findfont exch dup /size exch def scalefont setfont } def
  97. /rm { exch 72 mul hres div exch 72 mul vres div rmoveto } def
  98.  
  99. /u { size mul 100 div setlinewidth
  100.         size mul 100 div /uloffset exch def
  101.         currentpoint /uly exch def /ulx exch def s
  102.         currentpoint /cury exch def /curx exch def
  103.         newpath ulx uly uloffset add moveto
  104.         curx cury uloffset add lineto stroke
  105.         curx cury moveto
  106.     } def
  107. /ss { /ssoffset exch def
  108.         0 ssoffset size mul 100 div rmoveto s
  109.         0 ssoffset size mul 100 div neg rmoveto
  110.     } def
  111.  
  112. 
  113.